/**
 * File: InterceptorInfo.java
 * Created by: mhaimel
 * Created on: 7 Jul 2009
 * CVS:  $Id: InterceptorInfo.java,v 1.1 2009/08/05 15:16:12 mhaimel Exp $
 */
package uk.ac.ebi.curtain.management;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * @author mhaimel
 *
 */
public class InterceptorInfo {
	private final String originName;

	public InterceptorInfo(String originName) {
		super();
		this.originName = originName;
	}

	public String getOriginName() {
		return originName;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((originName == null) ? 0 : originName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		InterceptorInfo other = (InterceptorInfo) obj;
		if (originName == null) {
			if (other.originName != null)
				return false;
		} else if (!originName.equals(other.originName))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this,ToStringStyle.SHORT_PREFIX_STYLE);
	}
	
	
	
}
